feat: add structured data and API interaction tools - #869
Conversation
…nd tasks for REST API, GraphQL, JSON, YAML, data transformation, and webhook management tools
Add REST API client, GraphQL client, webhook management, JSON/YAML manipulation, and data transformation tools with full test coverage. - src/tools/api.js: REST API client with auth, URL filtering, timeouts - src/tools/graphql.js: GraphQL client with depth/complexity limits - src/tools/webhook.js: Webhook CRUD and HMAC verification - src/tools/json.js: JSON parse, serialize, transform, filter, access - src/tools/yaml.js: YAML parse, serialize, transform, filter, access - src/tools/data.js: JSON/YAML/CSV format conversion - src/sandbox/urlFilter.js: URL allowlist with test mode support - tests/unit/*.test.js: Unit tests for all new tools - tests/integration/*.test.js: Integration tests with mock servers - src/tools/index.js: Tool registration with permission gating
🔍 PR Audit: structured-data-api-toolsChange: Spec Compliance
Deviation: GraphQL uses native Task Completion45/45 tasks from Test Coverage
Total: 53 tests, all passing. Security
Code Quality
Gaps (Post-Merge Follow-ups)
Verdict: APPROVEDComprehensive implementation following project patterns. All spec requirements met. Test coverage is solid for unit tests; integration tests exist for network tools. Minor concerns are low-risk and can be addressed post-merge. Audit performed against OpenSpec change |
Move completed OpenSpec artifacts to archive with date prefix. Mark all tasks as complete in tasks.md.
…ve dead graphql-request dep
PR #869 Audit ReportWhat was implemented correctlyREST API Client (
GraphQL Client (
JSON Manipulation (
YAML Manipulation (
Data Transformation (
Webhook Management (
Security (all fixed):
Code quality:
Missing from the spec/issue1. GraphQL schema introspection (OpenSpec spec requirement + issue #788)
2. Rate limiting (issue #788 security considerations)
Extra features not explicitly requestedNone significant. The Bugs & Issues1. Dead
2. GraphQL depth/complexity are heuristic-based (acknowledged in design doc)
Security AssessmentGood:
Acceptable:
No critical security issues found. Does it make sense for the harness & LLM?Yes. The tools:
Summary
Recommendation: Merge with two small follow-ups:
The PR is solid, well-structured, and addresses the core need: structured API interaction tools for the harness. |
avoidwork
left a comment
There was a problem hiding this comment.
Correction: the audit comment incorrectly flagged a "dead format parameter" on JSON and YAML tools. Verified against the actual code — neither schema has a format field. The format field only exists on the data tool where it is correctly used for input validation. That bug does not exist.
Description
Adds six new tools — api, graphql, json, yaml, data, and webhook — for REST API interaction, GraphQL introspection, structured data manipulation, and webhook management. Includes URL validation and rate limiting in the api and graphql tools, constant-time HMAC comparison in the webhook tool, and async fs operations with persistent storage in memory/tools/ for the webhook tool. Also fixes YAML input parsing (JSON.parse → proper YAML parse), ensures memory/tools/ directory exists on startup, and archives the OpenSpec change.
Type of Change
Testing
Coverage
Checklist
npm run lintpasses